﻿ 

using MVC.OA.EFDAL;
using MVC.OA.IDAL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MVC.OA.DALFactory
{
    /// <summary>
    /// DbSession拥有整个DAL的访问入口以及提交操作的权限
    /// </summary>
   public partial class DbSession:IDbSession
    {
		//跨世纪的操作，将添加 删除 修改的操作权限提取到了BLL层，在BaseDAL层里的删除修改
        //方法中的提交操作提取出来
        public int SaveChanges()
        {
            return DbContextFactory.GetCurrentContext().SaveChanges();
        }
		
	 public IActionInfoDAL ActionInfoDAL
        {
            get { return StaticDALFactory.GetActionInfoDAL(); }
        }	
		
	 public IOrderInfoDAL OrderInfoDAL
        {
            get { return StaticDALFactory.GetOrderInfoDAL(); }
        }	
		
	 public IRoleInfoDAL RoleInfoDAL
        {
            get { return StaticDALFactory.GetRoleInfoDAL(); }
        }	
		
	 public IUserInfoDAL UserInfoDAL
        {
            get { return StaticDALFactory.GetUserInfoDAL(); }
        }	

	}
}